package com.example.memo2.data.model

import androidx.room.Entity
import androidx.room.PrimaryKey
import com.example.memo2.R
import java.util.Date

@Entity(tableName = "memos")
data class Memo(
    @PrimaryKey(autoGenerate = true)
    val id: Long = 0,
    val title: String,
    val content: String,
    val priority: Priority = Priority.NORMAL,
    val createdAt: Date = Date(),
    val updatedAt: Date = Date(),
    val reminderTime: Date? = null,
    val imagePaths: String? = null, // 存储图片路径，用逗号分隔
    val audioPath: String? = null,
    val location: String? = null
)

enum class Priority(val value: Int, val displayNameResId: Int, val colorResId: String) {
    URGENT_IMPORTANT(0, R.string.priority_urgent_important, "#F44336"), // 红色
    IMPORTANT_NOT_URGENT(1, R.string.priority_important_not_urgent, "#FF9800"), // 橙色
    NORMAL(2, R.string.priority_normal, "#2196F3") // 蓝色
} 